package com.calvin.study.multithread.thread;

import com.calvin.study.utils.Print;

//当一个程序运行时，在栈内存中的存储结构
public class Thread0 {

	public static String getCurThreadName() {
		return Thread.currentThread().getName();
	}

	public static void main(String args[]) throws InterruptedException {
		Print.cfo("当前线程名称： " + Thread.currentThread().getName());
		Print.cfo("当前线程ID： " + Thread.currentThread().getId());
		Print.cfo("当前线程状态： " + Thread.currentThread().getState());
		Print.cfo("当前线程优先级： " + Thread.currentThread().getPriority());
		int a = 1, b = 1;
		int c = a / b;
		StackAreaDemo.anotherFun();
		Thread.sleep(1000);

	}
	
	static class StackAreaDemo {

		private static void anotherFun() {
			int a = 1, b = 1;
			int c = a / b;
			anotherFun2();
		}

		private static void anotherFun2() {
			int a = 1, b = 1;
			int c = a / b;
		}
	}
}
